home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / p_man / catD / hwgraph.dev.z / hwgraph.dev
Encoding:
Text File  |  1998-10-30  |  7.5 KB  |  133 lines

  1.  
  2.  
  3.  
  4. hhhhwwwwggggrrrraaaapppphhhh....ddddeeeevvvv((((DDDD3333XXXX))))                                              hhhhwwwwggggrrrraaaapppphhhh....ddddeeeevvvv((((DDDD3333XXXX))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      _hhhh_wwww_gggg_rrrr_aaaa_pppp_hhhh_...._dddd_eeee_vvvv_:::: hwgraph_block_device_add, hwgraph_char_device_add,
  10.      hwgraph_chmod, device_info_set, device_info_get - create and use device
  11.      vertex
  12.  
  13. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  14.      ####iiiinnnncccclllluuuuddddeeee <<<<ssssyyyyssss////ttttyyyyppppeeeessss....hhhh>>>>
  15.      ####iiiinnnncccclllluuuuddddeeee <<<<ssssyyyyssss////hhhhwwwwggggrrrraaaapppphhhh....hhhh>>>>
  16.      ####iiiinnnncccclllluuuuddddeeee <<<<ssssyyyyssss////ddddddddiiii....hhhh>>>>
  17.  
  18.      ggggrrrraaaapppphhhh____eeeerrrrrrrroooorrrr____tttt
  19.      hhhhwwwwggggrrrraaaapppphhhh____bbbblllloooocccckkkk____ddddeeeevvvviiiicccceeee____aaaadddddddd((((vvvveeeerrrrtttteeeexxxx____hhhhddddllll____tttt _f_r_o_m__v_h_d_l,,,,
  20.                          cccchhhhaaaarrrr ****_p_a_t_h,,,,
  21.                          cccchhhhaaaarrrr ****_d_r_i_v_e_r__p_r_e_f_i_x,,,,
  22.                          vvvveeeerrrrtttteeeexxxx____hhhhddddllll____tttt ****_v_h_d_l__p_t_r))));;;;
  23.  
  24.      ggggrrrraaaapppphhhh____eeeerrrrrrrroooorrrr____tttt
  25.      hhhhwwwwggggrrrraaaapppphhhh____cccchhhhaaaarrrr____ddddeeeevvvviiiicccceeee____aaaadddddddd((((vvvveeeerrrrtttteeeexxxx____hhhhddddllll____tttt _f_r_o_m__v_h_d_l,,,,
  26.                          cccchhhhaaaarrrr ****_p_a_t_h,,,,
  27.                          cccchhhhaaaarrrr ****_d_r_i_v_e_r__p_r_e_f_i_x,,,,
  28.                          vvvveeeerrrrtttteeeexxxx____hhhhddddllll____tttt ****_v_h_d_l__p_t_r))));;;;
  29.  
  30.      vvvvooooiiiidddd
  31.      ddddeeeevvvviiiicccceeee____iiiinnnnffffoooo____sssseeeetttt((((vvvveeeerrrrtttteeeexxxx____hhhhddddllll____tttt _d_e_v_i_c_e,,,, vvvvooooiiiidddd ****_i_n_f_o))));;;;
  32.  
  33.      vvvvooooiiiidddd ****
  34.      ddddeeeevvvviiiicccceeee____iiiinnnnffffoooo____ggggeeeetttt((((vvvveeeerrrrtttteeeexxxx____hhhhddddllll____tttt _d_e_v_i_c_e))));;;;
  35.  
  36.      vvvvooooiiiidddd
  37.      hhhhwwwwggggrrrraaaapppphhhh____cccchhhhmmmmoooodddd((((vvvveeeerrrrtttteeeexxxx____hhhhddddllll____tttt _v_h_d_l,,,, mmmmooooddddeeee____tttt _m_o_d_e))));;;;
  38.  
  39.    AAAArrrrgggguuuummmmeeeennnnttttssss
  40.      _d_e_v_i_c_e      Vertex handle of a device vertex, typically one created by
  41.                  _h_w_g_r_a_p_h__b_l_o_c_k__d_e_v_i_c_e__a_d_d() or _h_w_g_r_a_p_h__c_h_a_r__d_e_v_i_c_e__a_d_d().
  42.  
  43.      _d_r_i_v_e_r__p_r_e_f_i_x
  44.                  The device driver character string prefix of the device
  45.                  driver that is to manage the newly-created device.
  46.  
  47.      _f_r_o_m__v_h_d_l   Vertex handle that is the connection point of the device to
  48.                  be described.  Typically the vertex handle passed to the
  49.                  _a_t_t_a_c_h entry point of a device driver.
  50.  
  51.      _m_o_d_e        A standard file protection mode as declared in sys/stat.h.
  52.  
  53.      _p_a_t_h        An edge name, or a sequence of edge names separated by
  54.                  slashes (which looks exactly like a relative pathname in the
  55.                  /hw filesystem).
  56.  
  57.      _v_h_d_l        A vertex handle of a device in the hwgraph.
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. hhhhwwwwggggrrrraaaapppphhhh....ddddeeeevvvv((((DDDD3333XXXX))))                                              hhhhwwwwggggrrrraaaapppphhhh....ddddeeeevvvv((((DDDD3333XXXX))))
  71.  
  72.  
  73.  
  74.      _v_h_d_l__p_t_r    A pointer to a field where a new vertex handle is returned.
  75.  
  76. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  77.      The device_add functions operate on the hardware graph to add a new
  78.      vertex that represents a block or a char device.  The new vertex is
  79.      visible in /hw as a character or block device special file.  The device
  80.      is controlled by the device driver that is identified by _p_r_e_f_i_x, so that
  81.      _p_r_e_f_i_x__o_p_e_n() is called when the new vertex is opened.  When it is
  82.      opened, the dev_t passed to the driver's open entry point matches the
  83.      vertex_hdl_t returned in _v_h_d_l__p_t_r.
  84.  
  85.      The _d_e_v_i_c_e__i_n_f_o__s_e_t() function associates a pointer-sized piece of
  86.      information with a specified dev_t for later retrieval by
  87.      _d_e_v_i_c_e__i_n_f_o__g_e_t().  Typically, this information is a pointer to a per-
  88.      device data structure allocated by the driver in its _a_t_t_a_c_h entry point.
  89.  
  90.      CCCCaaaauuuuttttiiiioooonnnn:  A device driver should never change the device-info of any
  91.      vertex that the device driver did not create.  In particular, the vertex
  92.      that is passed to the _a_t_t_a_c_h() entry point of a PCI driver is owned by
  93.      the PCI infrastructure.  If the driver sets the device-info of that
  94.      connection-point vertex, the PCI infrastructure is likely to crash.  A
  95.      driver is always free to change the device-info of a vertex that the
  96.      driver itself creates using the device_add functions.
  97.  
  98.      _h_w_g_r_a_p_h__c_h_m_o_d() sets the initial (default) access mode of the /hw
  99.      representation of the specified vertex.
  100.  
  101. DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
  102.      The *_device_add functions return GRAPH_SUCCESS when the operation
  103.      completes successfully, or a failure code as listed in _h_w_g_r_a_p_h(D3X) when
  104.      the operation does not complete successfully.
  105.  
  106.      _d_e_v_i_c_e__i_n_f_o__s_e_t() always succeeds and has no return value.  It is the
  107.      caller's responsibility to pass a valid _d_e_v_i_c_e; that is, a dev_t that
  108.      represents a vertex in the hardware graph.
  109.  
  110.      _d_e_v_i_c_e__i_n_f_o__g_e_t() returns the pointer-sized piece of information
  111.      associated with the specified _d_e_v_i_c_e.  This value is unpredictable until
  112.      _d_e_v_i_c_e__i_n_f_o__s_e_t() has been called.
  113.  
  114. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  115.      hwgraph.inv(D3X), hwgraph.intro(D4X).
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.